package ch5;

import java.util.Scanner;

public class Square {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("请输入长方形的长和高：");
		int w = in.nextInt();// chang
		int h = in.nextInt();// 高
		// 内外无关
		for (int i = 1; i <= h; i++) {
			// 先输出空格，个数和h有关
			for (int k = 1; k <= h - i; k++) {
				System.out.print(" ");
			}
			for (int j = 1; j <= w; j++) {
				System.out.print("* ");
			}
			System.out.println();
		}

		// for (int i = 1; i <= w * h; i++) {
		// System.out.print("* ");
		// // 一行是w个*
		// if (i % w == 0)
		// System.out.println();
		// }
	}
}
